The Push Notifications Console now includes metrics for notifications sent in production through the Apple Push Notification service (APNs). With the console’s intuitive interface, you’ll get an aggregated view of delivery statuses and insights into various statistics for notifications, including a detailed breakdown based on push type and priority.
Introduced at WWDC23, the Push Notifications Console makes it easy to send test notifications to Apple devices through APNs.
Learn more.
APNS
RSS for tagSend push notifications to Mac, iOS, iPadOS, tvOS devices through your app using the Apple Push Notifications service (APNs).
Posts under APNS tag
200 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Team-scoped keys introduce the ability to restrict your token authentication keys to either development or production environments. Topic-specific keys in addition to environment isolation allow you to associate each key with a specific Bundle ID streamlining key management.
For detailed instructions on accessing these features, read our updated documentation on establishing a token-based connection to APNs.
Question, if I am writing async code in the notification service extension, I understand it terminates after 30 seconds.
If I want to wait until these async methods finish before calling the content handler, I believe an option I have is to use dispatch groups. However I am open to other solutions if there are better options.
My question is, if I use dispatch groups, is there any issue in using the main queue here? Or does the main thread not make sense to use in the context of the NSE?
dispatch_group_notify(group, dispatch_get_main_queue(), ^{
if (self.contentHandler) {
self.contentHandler(self.bestAttemptContent);
}
});
Or is it recommended to instead use a different queue in the NSE?
dispatch_queue_t nseQueue = dispatch_queue_create("com.blah.blah.nse.queue", DISPATCH_QUEUE_SERIAL);
dispatch_group_notify(group, dispatch_get_global_queue(QOS_CLASS_(SOMETHING), 0), ^{ ... });
OR am I over thinking this? :) Thanks ahead of time, relatively new to iOS so just looking to learn/understand better.
Topic:
App & System Services
SubTopic:
Notifications
Tags:
APNS
Extensions
Notification Center
User Notifications
I have converted a large part of the data, but only 5% of the data was successfully converted. The failed devicetoken shows "bad devicetoken" when accessing APNS. Here are examples of failed conversions devicetoken. Is there any official documentation for this part?
DeviceToken Orgin \xc2\xa1\xcb\x9cr\xc3\x81\xe2\x80\x9e\x01b\xc3\xbce1pf\t\xc2\xa7\xc3\x82v}\xc3\xa1\xc3\x9a:?\r\n\xc3\xa5\xc6\x92\xc3\xb7y\xc3\x9e\xe2\x80\x9c\xc3\x89r
Hi all,
I have a React web app that we use as a Progressive Web App (PWA). We currently:
Use PWA Builder to package it for Android and iOS
Host the app on a secure HTTPS URL
Use Firebase Cloud Messaging (FCM) for push notifications (working on Android)
However, on iOS, we are unable to get push notifications to work. I understand that PWAs on iOS have limited push support (Safari only, and not through WebView). So I explored using Capacitor, but:
Capacitor can load a server.url pointing to our hosted app (great for reuse), but push notifications don’t work
If we build the web app locally (npm run build) and embed it in the native iOS shell via Capacitor, push works
We would prefer not to fully merge our authentication and main app UIs if avoidable
Questions:
Is there any approved way to enable push notifications in an iOS .ipa built from a hosted web app (URL) using PWA Builder?
If not, is embedding the web assets locally the only Apple-approved way to get push support?
Are there any best practices or native plugin recommendations (e.g., APNs or FCM) for handling push notifications in iOS app?
Thanks in advance for any guidance. 🙏
Let me know if more technical details would help.
I've been using Apple's push service for pass notifications for years (since 2012) and everything has been working fine until recently. With no code changes, the push service has stopped working.
Passes can still be installed on the device and pull to refresh does get the updates and highlights changes properly, so the pass signing is working properly, it's just the push notices don't seem to be getting to the device. I am getting log messages back from the APNS, and fwrite is returning the number of bytes written so I don't think there are any authentication issues. I'm using PHP on my own web server in case that's relevant. I also disabled rate limiting in the developer settings on my device to make sure that isn't the issue. I've also verified there are no outstanding messages in the feedback service (which also works fine without any errors). In fact, there are no errors and acting like everything is working which is why it is frustrating to troubleshoot since the problem seems to be between Apple and the device.
I don't know if this may be related, but I know I saw this post from apple about a certificate change: https://developer.apple.com/news/?id=09za8wzy
I have checked that the server has the new certificate per the instructions in this post: https://developer.apple.com/forums/thread/772665
Still no push updates work, however the Lock Screen location messages do appear and pass update notifications do appear on the Lock Screen correctly but only after pulling to refresh on the back of the pass.
Does anyone have any ideas on how to fix or even start troubleshooting why the pushes aren't being delivered to the phone?
We're building a taxi driver app. Our goal is simple:
Play a notification sound when a new ride request arrives — even if the iPhone is connected to CarPlay.
We use Firebase push with "sound": "default" and "interruption-level": "time-sensitive". The app requests .carPlay and uses a category with .allowInCarPlay.
Everything works when CarPlay is disconnected — we get sound and banner. But when connected to CarPlay:
the push is delivered silently,
no sound is played (even on the phone),
Siri Announce is enabled, but nothing is spoken.
Questions:
Is notification sound blocked when CarPlay is active, unless the app has CarPlay entitlement?
Is Siri Announce the only way to notify the driver audibly in this case?
Would getting a CarPlay entitlement (e.g. CarPlay.communication) fix this without building a full CarPlay UI?
Thanks — all we need is a reliable sound alert when a new ride comes in.
with iOs26 it works so so great, that every time i look something up ChatGPT is the first thing to Seach the web for everything about it then, i can read it an it gives a link for me to go to if i wont to further look inti it ,this on I Phone SE 3 Generation ,it has better Siiri to better on the I Phone SE 3rd Generation.
I'm currently seeing that OS gets a new push-to-start token immediately after receiving the first notification.
Should my server immediately invalidate the push-to-start token upon usage?
Or invalidating the push-to-start token should only be done if my iOS device gets a new one and then I have to send it back to my server.
Hi everyone!
I’m integrating push notifications for a taxi-driver app and ran into a blocking CarPlay issue.
When the iPhone is connected to CarPlay (wired or wireless), the push arrives on the phone without any sound and nothing is shown or announced on the CarPlay screen.
If I unplug CarPlay, the same push plays the default sound and shows a normal banner on the lock screen, so the payload itself looks valid.
Environment
iPhone 13 Pro, iOS 18.0
CarPlay head-unit: Xcode 16.2 CarPlay Simulator
App built with Flutter 3.22 + firebase_messaging: ^15.2.5
Deployment target: iOS 14.0
Xcode capabilities enabled: Push Notifications, Time-Sensitive Notifications
App settings on the device: Allow Notifications -› Sounds ON, Show in CarPlay ON
Siri › Announce Notifications › CarPlay: master toggle ON + my app added to the allowed list
Driving Focus = Off (same result if it’s On)
Native setup in AppDelegate.swift
UNUserNotificationCenter.current().requestAuthorization(
options: [.alert, .sound, .badge, .carPlay]
) { _,_ in }
let carPlayCategory = UNNotificationCategory(
identifier: "CARPLAY_ORDER",
actions: [],
intentIdentifiers: [],
options: [.allowInCarPlay]
)
UNUserNotificationCenter.current().setNotificationCategories([carPlayCategory])
UNUserNotificationCenter.current().delegate = self
application.registerForRemoteNotifications()
APNs payload that I send via FCM
{
"aps": {
"alert": {
"title": "New test order",
"body": "Location info test"
},
"sound": "default",
"category": "CARPLAY_ORDER",
"interruption-level": "time-sensitive",
"relevance-score": 1
}
}
What could be the problem? Please help me solve the error
everytime i get my devicetoken from mdm certification,send to apns (api.push.apple.com 443),always return 400,please help me confirm if the devicetoken is expired or somethine wrong else
here is the request and response
device_token:79c3aec2b2c2b672c3b756c3910977c3a936c3aae280985ac380e280a6091cc2bfc3a132192b14c392c2be7a2ee280a229c3aa
push_magic:AAFDAB81-0E63-4B72-A60A-1F8085325870
status_code: 400
headers: {'apns-id': '14BDD477-7D76-A2FB-582C-140BBD95A420'} resp: {'reason': 'BadDeviceToken'}
Apps distributed via TestFlight have a 90-day expiration period, and we have been sending push notifications to mobile devices daily. Will push notifications still be delivered to mobile devices after the app has expired?
With the advent of APNs pushs to Widgets, I would like to confirm some things. I understand that we have a budget of updates for it, however is the budget for APNs part of the budget for background updates? In other words, 1 budget for both or 2 separate budgets?
Also, can we make a push to an individual widget, or are we essentially calling .reloadAllTimelines()?
I was recently made aware of a relatively new method on PTChannelManagerDelegate that allows the backend infrastructure to update the PTT service on a device.
incomingServiceUpdatePush(channelManager:channelUUID:pushPayload:isHighPriority:remainingHighPriorityBudget:completion:)
I remember the person stated that there was a specific format that the payload must have, but I am unable to find any documentation about it.
Can somebody point me to documentation on how to send this type of push notification for incomingServiceUpdatePush or give me an example payload? I believe it uses the same PTT push token, but if the headers are different, then please specify those differences too. Thanks!
I want to create a verified Mobile Device Management (MDM) profile for Apple devices. As we are developing a solution to manage customer-owned Apple devices by remotely installing and managing an MDM configuration profile (both supervised and unsupervised way).
Any documentation, enrollment prerequisites (such as Apple Business Manager or Developer Enterprise Program), and support you can provide in this regard would be greatly appreciated.
In the app we are developing, we update the device token upon app launch using didRegisterForRemoteNotificationsWithDeviceToken. Previously, after an iOS major update, if the app was left without being launched, users experienced an issue where notifications would not be received. Later, we confirmed that running didRegisterForRemoteNotificationsWithDeviceToken during app launch updates the device token and restores the ability to receive notifications.
Therefore, we believe that the device token may change due to an iOS major update. We want to understand the detailed conditions under which the device token is updated due to an iOS update:
Does the same issue occur after iOS minor updates as well?
Does it always happen during iOS major updates?
We reviewed the official documentation, but there was no detailed description of the device token update conditions. Additionally, we contacted Apple, but received no clear answers. If anyone has experienced the same situation, we would appreciate any information you can share.
Topic:
App & System Services
SubTopic:
Notifications
Tags:
APNS
Notification Center
User Notifications
Error in application:didFailToRegisterForRemoteNotificationsWithError: no valid aps-environment entitlement string found for application
have tried out the below commands
% codesign -d --entitlements - /path/to/your.app
% security cms -D -i /path/to/your.app/embedded.mobileprovision
and it seems both are working fine,
Im currently developing react native app with expo and firebase for notifications
this works fine when im running it via installing the app from testflight, but the issue occurs when i test in testflight or while the apple team reviewing my app
My entitlements file
<dict>
<key>aps-environment</key>
<string>production</string>
</dict>
</plist>
We are currently developing a WebAPI service that uses APNs (HTTP/2) to send push notifications to iOS devices.
(Using PushSharp's HTTP/2 support)
The WebAPI service is running on IIS using .net framework 4.8 and c#.
The connection to APNs is always maintained, and the connection is checked every 30 minutes using a dummy token Ping.
KeepAlivePeriod = 30 minutes and KeepAliveRetryPeriod = 10 seconds have also been set.
However, the following issues are occurring.
Although the Ping sent immediately before was successful, a TimeoutException occurs in the notification request sent a few minutes later.
There is no explicit disconnection notification from APNs, and the connection appears to be silently disconnected.
Once a TimeoutException occurs, it occurs frequently afterwards.
Below is an excerpt from the log.
Apple Notification Failed for some unknown reason 1-1: One or more errors occurred.
Apple Notification Failed for some unknown reason 1-2:System.TimeoutException: The operation timed out.
In light of this issue, I would like to be advised on the following two points.
Are there any official specifications regarding the lifecycle and expiration date of APNs HTTP/2 connections?
Even if pings are sent periodically, is there a timeout or other setting that disables the connection on the APNs side?
What are the conditions that would cause APNs to silently terminate a connection?
For example, could this be due to inactivity, TLS restrictions, network maintenance, etc.?
If you have any official documentation or technical guidelines to improve the reliability of this system, we would appreciate it if you could share them with us.
Thank you in advance.
Currently working on a dating app which needs voip for audio and video calls for ios. the voip notifications only comes to the app in active and inactive mode but doesnt wake the device in background or terminated mode. After debugging i noticed that com.apple.developer.voip entitlement wasnt included which i later added, trying to create a build i get the eas error that the entitlement wasnt added to the identifier capabilities. My issue now is that i can't seem to find the voip capability to check in the identifiers capabilities list for the bundle id.d
Hi Apple team and fellow developers,
We previously had Location Push Service Extension enabled and working in production. After transferring the app to a new Apple Developer team, the production App ID was transferred, but the Location Push entitlement was not retained.
We've also created a new App ID for development, and now need Location Push access enabled for both the transferred production ID and the new development ID.
We’ve already submitted the Location Push Access form with all relevant details.
Unfortunately, the App Transfer documentation didn’t make it clear that Location Push access would be lost, and now we’re blocked from making new builds — even for the existing production app.
❓ Questions:
Is it possible to re-enable Location Push for a transferred App ID?
What’s the expected timeline for entitlement approval?
Can Apple staff confirm the request status or let us know if any further action is needed?
Thanks in advance — this entitlement is critical for our app’s functionality and release pipeline.
Best,
Aidar
Topic:
App & System Services
SubTopic:
Notifications
Tags:
APNS
Developer Tools
Maps and Location
Developer Program
Does live activity require notification permission? If you need to update card data through APNS, I remember that it was required in the past, otherwise the card could not be created. This year I tried it and some apps did not have notification permission, but they could also use live activity and update data
Confusion
Based on the fact that the subscription is requested on a Activity type, I assumed that the push-to-start tokens would be different. But the push-to-start token for WidgetExtensionAttributes and WidgetExtensionAttributesOther were identical. This is misleading.
The code below prints identical tokens even though the name of the token and their underlying schema are different.
Code Sample
func getTokens() {
Task {
if let data = Activity<func getTokens() {
Task {
if let data = Activity<WidgetExtensionAttributes>.pushToStartToken {
print("exists:", data.hexadecimalString)
} else {
print("requesting pushToStartToken")
for await ptsToken in Activity<WidgetExtensionAttributes>
.pushToStartTokenUpdates {
let ptsTokenString = ptsToken.hexadecimalString
print("new:", ptsTokenString)
}
}
}
Task {
if let data = Activity<WidgetExtensionAttributesOther>.pushToStartToken {
print("other exists:", data.hexadecimalString)
} else {
print("other requesting pushToStartToken")
for await ptsToken in Activity<WidgetExtensionAttributesOther>
.pushToStartTokenUpdates {
let ptsTokenString = ptsToken.hexadecimalString
print("other new:", ptsTokenString)
}
}
}
}>.pushToStartToken {
print("exists:", data.hexadecimalString)
} else {
print("requesting pushToStartToken")
for await ptsToken in Activity<WidgetExtensionAttributes>
.pushToStartTokenUpdates {
let ptsTokenString = ptsToken.hexadecimalString
print("new:", ptsTokenString)
}
}
}
Task {
if let data = Activity<WidgetExtensionAttributesOther>.pushToStartToken {
print("other exists:", data.hexadecimalString)
} else {
print("other requesting pushToStartToken")
for await ptsToken in Activity<WidgetExtensionAttributesOther>
.pushToStartTokenUpdates {
let ptsTokenString = ptsToken.hexadecimalString
print("other new:", ptsTokenString)
}
}
}
}
Activity Types
struct WidgetExtensionAttributesOther: ActivityAttributes {
public struct ContentState: Codable, Hashable {
var age: Int
}
var addresses: [String]
}
struct WidgetExtensionAttributes: ActivityAttributes {
public struct ContentState: Codable, Hashable {
var emoji: String
}
var name: String
}
Docs
After much investigation I noticed the wording of the docs kind of hint that the push-to-start token is per ActivityKit as it says:
An asynchronous sequence you use to observe changes to the token for starting a Live Activity with an ActivityKit push notification.
But docs and the API don't align well.
Questions
Is it correct that the push-to-start token is per app? If so then is there a reason that that API designers decided to still have to pass a specific type and not just make a request without passing a type?
Should I maybe file a radar?
Is it correct to say push-to-start is per app, while update tokens are per instance. i.e. if I have two soccer matches, then unless the push-to-start token was refreshed by the OS, then both would use the same push-to-start token, however each match would have a unique update token?